1. Field of the Invention
The present invention relates to an apparatus for coding moving picture, and more particularly, to an apparatus for coding moving picture, in which a part of frames of the moving picture is coded into intra-frames (I-pictures), a part of frames sandwiched between contiguous intra-frames is coded into forward predictive frames (P-pictures), and frames sandwiched between a forward predictive frame and another forward predictive frame or an intra-frame is coded into a bidirectionally predictive frames (B-pictures).
2. Description of the Prior Art
Picture data has an enormous data amount and thus is normally coded into compressed digital data in order to be recorded in a record medium such as a CD-ROM and a hard disk. Such the compressive coding methods include various types. In particular, a coding method that compresses on the basis of DCT (Discrete Cosine Transform), which uses a characteristic of spatial frequencies that concentrate in low frequencies, is employed relatively wider. DCT is employed in International Standard coding methods such as JPEG (Joint Photographic Coding Experts Group), MPEG (Moving Picture Coding Experts Group) 1 and 2.
A frame rate (the number of frames per unit time) is determined in a moving picture coding method of a storage type as represented by MPEG1. Even a moving picture coding apparatus with a low compression performance, therefore, is not allowed to reduce a frame rate in order to compress a picture in real time.
A method for reducing a substantial frame rate while complying with the standard of MPEG 1 is disclosed in JPA 10-42295. The method reduce a substantial frame rate by omitting practical compression process for a part of inter-frame pictures (P-pictures and B-pictures) while generating codes indicating that the pictures has no difference.
A period for generating the codes indicating that the pictures has no difference, however, does not always match with the substantial frame rate of the moving picture coding apparatus. Thus, there is a disadvantage that the moving picture can not be compressed at a high efficiency without wasting a performance of the moving picture coding apparatus.
JPA 10-70727 solves a delay that occurs on transmission of compressed video information by deleting B-blocks.
The delay of transmission, however, is not always proportional to the compressive performance. Thus, there is also a disadvantage that the moving picture can not be compressed at a high efficiency without wasting a performance of the moving picture coding apparatus.
JPA 9-130787 adjusts a frame rate by determining frames to skip in accordance with a practical code amount.
The code amount, however, is not always proportional to the compressive performance. Thus, there is still a disadvantage that the moving picture can not be compressed at a high efficiency without wasting a performance of the moving picture coding apparatus.
In order to overcome the aforementioned disadvantages, the present invention has been made and accordingly, has an object to provide an apparatus for coding moving picture capable of compressing a moving picture at a high efficiency without wasting a performance of the apparatus.
According to a first aspect of the present invention, there is provided an apparatus for coding a moving picture while coding a part of frames of the moving picture into intra-frames (I-pictures), a part of frames sandwiched between contiguous intra-frames into forward predictive frames (P-pictures), and frames sandwiched between a forward predictive frame and another forward predictive frame or an intra-frame into a bidirectionally predictive frames (B-pictures), comprising: a determining means for determining the number of B-pictures between a P-picture and another P-picture or an I-picture based on an output frame rate and a substantial frame rate which is defined as the number of pictures capable of being processed per unit time by the apparatus provided that only I-pictures and P-pictures are coded; and a coding means for coding the B-pictures by treating the B-pictures as frames with no differential data.
In the apparatus for coding moving picture, the coding means may generate for each of the B-pictures a code sequence determined on the basis of a frame size of the moving picture.
In the apparatus for coding moving picture, the determining means may determine the number of the B-pictures so that the apparatus operates at the maximum performance ability.
In the apparatus for coding moving picture, the determining means may determine the number of the B-pictures so that the number of the B-pictures distributes as uniformly as possible.
The apparatus for coding moving picture may further comprise: a means for selecting an output frame rate from a plurality of predetermined output frame rates so as to minimize the least common multiple between the substantial frame rate and the selected output frame rate.
The apparatus for coding moving picture may further comprise: a means for computing and updating the substantial frame rate on the basis of the number of frames compressed since the most recent updating of the substantial frame rate, a current output frame rate, the number of the B-pictures interpolated since the most recent updating of the substantial frame rate, and a total time waiting for capture of I-pictures and P-pictures since the most recent updating of the substantial frame rate.
According to a second aspect of the present invention, there is provided a method for coding a moving picture while coding a part of frames of the moving picture into intra-frames (I-pictures), a part of frames sandwiched between contiguous intra-frames into forward predictive frames (P-pictures), and frames sandwiched between a forward predictive frame and another forward predictive frame or an intra-frame into a bidirectionally predictive frames (B-pictures), comprising: a determining step of determining the number of B-pictures between a P-picture and another P-picture or an I-picture based on an output frame rate and a substantial frame rate which is defined as the number of pictures capable of being processed per unit time by the apparatus provided that only I-pictures and P-pictures are coded; and a coding step of coding the B-pictures by treating the B-pictures as frames with no differential data.
In the method for coding moving picture, at the coding step, a code sequence determined on the basis of a frame size of the moving picture is generated for each of the B-pictures.
In the method for coding moving picture, at the determining step, the number of the B-pictures is determined so that the apparatus operates at the maximum performance ability.
In the method for coding moving picture, at the determining step, the number of the B-pictures is determined so that the number of the B-pictures distributes as uniformly as possible.
The method for coding moving picture may further comprise: a step of selecting an output frame rate from a plurality of predetermined output frame rates so as to minimize the least common multiple between the substantial frame rate and the selected output frame rate.
The method for coding moving picture may further comprise: a step of computing and updating the substantial frame rate on the basis of the number of frames compressed since the most recent updating of the substantial frame rate, a current output frame rate, the number of the B-pictures interpolated since the most recent updating of the substantial frame rate, and a total time waiting for capture of I-pictures and P-pictures since the most recent updating of the substantial frame rate.
Other features and advantages of the invention will be apparent from the following description of the preferred embodiments thereof.